<%@ page language="java" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<%@ include file="taglibs.jsp" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>login</title>
	<meta http-equiv="content-type" content="text/html;charset=UTF-8">
  </head>
  <script type="text/javascript">
  	var loginDialog; 
	$(function(){
		loginDialog = $("#loginDialog").dialog({
			closable : false,
			modal : true,
			buttons : [{
				text : "登录",
				handler : function(){
					//$("#submitbutt").submit();
					$.ajax({
						url : 'welcome/login.html',
                        type : 'POST',
						data:{
							name : $("#name").val(),
							password : $("#password").val()
						},
						cache : false,
						dataType : 'json',
						success : function(re){
                              if(re == "000000"){
                                  location.href = "welcome/loginSuc.html";
                              }else{
                                  $("#ismsg").html(re);
                              }
						}
					})
				}		
			},{
				text : "注册",
				handler : function(){
					//console.info("注册");
				}	
			}]
		
		});
	});

  </script>
  <body>
    <div id="loginDialog" class="easyui-dialog" title="用户登录" style="width:320px;height:235px;">
    	<form id="submitbutt" action="welcome" method="post">
            <div class="ui-appcenterform" style="text-align:center;">
                <div class="ui-form">
                    <div class="ui-form-txt01" style="width: 80px;">用户名：</div>
                    <div class="ui-form-item"><input type="text" id="name" name="name" class="ui-txtinput01"></div>
	    	    </div>
                <div class="ui-form">
                    <div class="ui-form-txt01"  style="width: 80px;">密&nbsp;&nbsp;&nbsp;码：</div>
                    <div class="ui-form-item"><input type="password" id="password" name="password" class="ui-txtinput01"></div>
                </div>
                <br><span style="color: red;" id="ismsg"></span>
            </div>
    	 </form>

	</div>
  </body>
</html>
